Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix issue where live chart height is only partial of window in fullscreen mode. Issue: #186 #189

Conversation

yizheliu-amazon
Copy link
Contributor

@yizheliu-amazon yizheliu-amazon commented May 28, 2020

Issue #, if available:
#186
Description of changes:
Fix issue where live chart height is only partial of window in fullscreen mode.

The root cause: <EuiPage> doesn't explicitly set height as 100%, such that Dashboard page shrinks automatically if no live result or no sunburst result. Even full-screen css sets 100% height, the result height of full screen live chart is only 100% of the shrinked Dashboard page, while the height of live chart is fixed to 400px in full screen mode. More explanation: https://stackoverflow.com/a/31728799

Before:
Screen Shot 2020-05-28 at 3 13 52 PM

After:
Screen Shot 2020-05-28 at 5 37 46 PM

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ylwu-amzn ylwu-amzn linked an issue May 29, 2020 that may be closed by this pull request
Copy link
Contributor

@ylwu-amzn ylwu-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
height: 100vh;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this will fix the problem? Live chart on detector detail page is using 100% and no such problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vh doesn't fix it well, so I change to current solution, setting <EuiPage> height to 100%. 100vh makes sure the screen viewed by user is fully covered, but if page is too long, scrolling down will still show uncovered page. Example is below:

Screen Shot 2020-05-28 at 5 30 59 PM

Height 100% does its work, so I also use the same css full-screen as detector detail page uses. But height 100% works if <EuiPage> height is 100%, as root cause explained above. Detail page has no such problem because its height is already very long.

@yizheliu-amazon yizheliu-amazon merged commit a4e8b49 into opendistro-for-elasticsearch:master May 29, 2020
@yizheliu-amazon yizheliu-amazon deleted the full-screen branch May 29, 2020 01:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fullscreen height problem on dashboard
3 participants